<template>
  <el-dialog v-if="visible" :title="info.title" :visible.sync="visible" append-to-body center width="460px" :before-close="handleCancel">
    <el-form ref="formDate" label-suffix=":" label-width="100px" :rules="rules" :model="form">
      <el-row>
        <el-col :span="24">
          <el-form-item label="项目名称" prop="pro_id">
            <ProSelect v-model="form.pro_id" />
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="备注" prop="remark">
            <el-input v-model="form.remark" type="textarea" :rows="4" size="small" clearable style="width: 100%" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="fr mt10">
            <el-button size="small" @click="handleCancel()">取 消</el-button>
            <el-button type="primary" size="small" @click="handleEdit()">提 交</el-button>
          </div>
        </el-col>
      </el-row>
    </el-form>
  </el-dialog>
</template>

<script>
import ProSelect from '@/components/ProSelect'
import Upload from '@/myComponents/Upload'
import { addShigongtu } from '@/api/project/engineering'
import form from '@/utils/form'

export default {
  components: { ProSelect, Upload },
  extends: form,
  props: {
    reqAdd: {
      default: addShigongtu,
      type: Function
    }
  },
  data() {
    return {
      rules: {
        pro_id: [{ required: true, trigger: 'blur', message: '项目名称不可为空' }]
      },
      materials: [],
      list: []
    }
  },
  watch: {
    visible(val) {
      if (val) {
        this.$set(this, 'form', this.info.edit)
      }
    },
    getData: {
      type: Function,
      default: function() {}
    }
  },
  mounted() {
  },
  methods: {
  }
}
</script>

<style scoped>
.title{
  height: 34px;
  line-height: 34px;
  padding-left: 6px;
  font-size: 14px;
  font-weight: 600;
}
.mat-title{
  float: left;
  width: 30%;
  overflow: hidden;
  padding: 5px 10px;
  text-align: right;
  font-weight: bolder;
}
.mat-content{
  float: right;
  width: 70%;
  overflow: hidden;
  padding: 5px 10px;
}
</style>
